package com.qfedu.openplateform.manager.service.impl;

import com.qfedu.openplateform.manager.dao.TokenMapper;
import com.qfedu.openplateform.manager.entity.UserToken;
import com.qfedu.openplateform.manager.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author LLFZH
 * @date 2021/10/27 21:05
 * @className TokenServiceImpl
 * @description ：
 */
@Service
@Transactional
public class TokenServiceImpl implements TokenService {

    @Autowired
    private TokenMapper tokenMapper;

    @Override
    public List<UserToken> findAllToken(String accessToken) {
        return tokenMapper.findAllToken(accessToken);
    }

    @Override
    public void deleteUserTokenByIds(Integer[] ids) {
        tokenMapper.deleteUserTokenByIds(ids);
    }

    @Override
    public void updateToken(UserToken userToken) {
        tokenMapper.updateToken(userToken);
    }

}
